<template>
  <div class="info">
    <div class="card_con mb15">
      <el-row class="mb15">
        <el-col :span="8" class="pr40">
          <div class="fz14 mb15">手机号</div>
          <el-input v-model="shopKeeper" placeholder="请输入手机号"></el-input>
        </el-col>
        <el-col :span="8" class="pr40">
          <div class="fz14 mb15">时间</div>
          <el-date-picker
            value-format="yyyy-MM-dd HH:mm:ss"
            v-model="time"
            type="datetimerange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          >
          </el-date-picker>
        </el-col>
        <el-col :span="5">
          <div class="fz14 mb15">&nbsp;</div>
          <el-button type="primary">查询</el-button>
        </el-col>
      </el-row>
    </div>
    <div class="card_con">
      <el-table
        border
        :data="tableData"
        :header-cell-style="{
          'text-align': 'center',
        }"
        :cell-style="{ 'text-align': 'center' }"
        style="width: 100%"
        highlight-current-row
      >
        <el-table-column type="selection" min-width="5%"> </el-table-column>
        <el-table-column prop="id" label="id" min-width="5%"> </el-table-column>
        <el-table-column prop="tel" label="店主" min-width="20%">
        </el-table-column>
        <el-table-column prop="tel" label="手机号" min-width="20%">
        </el-table-column>
        <el-table-column prop="leixing" label="登录来源" min-width="10%">
        </el-table-column>
        <el-table-column prop="status" label="登录方式" min-width="10%">
        </el-table-column>
        <el-table-column prop="create_time" label="登录时间" min-width="20%">
        </el-table-column>
      </el-table>
      <div class="pagination">
        <Pagination
          :page="page"
          @onCurrentChange="handleCurrentChange"
          @onSizeChange="handleSizeChange"
        />
      </div>
    </div>
  </div>
</template>

<script>
import Pagination from "@/components/Pagination.vue";
export default {
  components: { Pagination },
  data() {
    return {
      shopKeeper: "",
      storeName: "",
      shopTypeId: 1,
      shopStateId: 1,
      time: "",
      page: {
        total: 0,
        pageNum: 1, // 当前页数
        pageSize: 10, // 每页的条数
      },
      shopState: [
        { id: 1, name: "启用" },
        { id: 2, name: "禁用" },
      ],
      shopType: [
        { id: 1, name: "入驻" },
        { id: 2, name: "自营" },
      ],

      tableData: [
        {
          id: "1",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "2",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "3",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "4",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "5",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "6",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
      ],
    };
  },
  methods: {
    //新增
    handleAdd() {
      this.$router.push("/shop/shop_edit");
    },
    handleClick(tab) {
      console.log(tab);
    },
    handleEdit() {
      this.$router.push("/shop/shop_edit");
    },
    // 每页 ${val} 条
    handleSizeChange(val) {
      //   this.$emit("onSizeChange", val);
    },
    // 当前页: ${val}
    handleCurrentChange(val) {
      //   this.$emit("onCurrentChange", val);
    },
  },
  created() {
    console.log(this.$route);
  },
};
</script>

<style lang="scss" scoped>
@import "@/style/index.scss";

.info {
  .title {
    font-size: 16px;
    margin-bottom: 13px;
  }
}
.pagination {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}
.el-select {
  width: 100%;
}

.tb {
  background-color: #fff;
  padding: 20px;
  box-sizing: border-box;
}
.row {
  display: flex;
  border-radius: 2px;
  border: 1px solid #ccc;
  width: 80px;
  .l {
    width: 80px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;

    i {
      margin-right: 6px;
      font-size: 18px;
    }
    &:hover {
      cursor: pointer;
    }
  }
  .l:nth-child(3) {
    border-right: 0;
  }
}
</style>
